

print(', '.join(['cats', 'rats', 'bats']))  # cats, rats, bats

print(' '.join(['My', 'name', 'is', 'Simon']))  # My name is Simon


print('My name is Simon'.split())  # ['My', 'name', 'is', 'Simon']
print('My name is Simon'.split(' '))  # ['My', 'name', 'is', 'Simon']

print('My name is Simon'.split('m'))  # ['My na', 'e is Si', 'on']

result_str = "1563256897#;111.1.1.1:123@u=123B/d=456KB;111.2.3.4:343@u=623B/d=956KB"

if '#' in result_str:
    item_result = result_str.split('#')
    timestamp = item_result[0]
    item_data = item_result[1]

    for item in item_data.split(";"):
        # print(item)
        if item is None or len(item) == 0:
            print("null item")
            continue
        else:
            sub_item = item.split('@')
            print(sub_item[0])
            if '/' in sub_item[1]:
                flows = sub_item[1].split('/')
                if 'u=' in flows[0]:
                    print("up: ", flows[0].split('=')[1])
                if 'd=' in flows[1]:
                    print("down: ", flows[1].split('=')[1])
            else:
                print("no / in string")
else:
    print("data error: ", result_str)